# Makefile for maildirsync

DISTFILES = maildirsync.pl maildirsync.pod Changes sample.sh contrib

VERSION   = $(shell ./maildirsync.pl --short-version)

all: dist index.html manual.html

README: maildirsync.pod
	perl -MPod::Text -e 'pod2text(q(maildirsync.pod))' >README

manual.html: maildirsync.pod
	pod2html maildirsync.pod >manual.html

index.html: index.htm Changes maildirsync.pl
	./gen_page.pl $(VERSION)

dist: maildirsync-$(VERSION).tar.gz

maildirsync-$(VERSION).tar.gz: README
	mkdir maildirsync-$(VERSION)
	cp -r $(DISTFILES) maildirsync-$(VERSION)
	tar c --exclude .svn -vzf maildirsync-$(VERSION).tar.gz maildirsync-$(VERSION)
	rm -rf maildirsync-$(VERSION)

clean:
	rm *.tar.gz index.html manual.html README

publish:
	rsync -arv --rsh=ssh . hacks.dlux.hu:hacks-www/maildirsync/
